package com.healthy.suggestions.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.healthy.suggestions.mapper.UserHealthHistoryMapper;
import com.healthy.suggestions.domain.UserHealthHistory;
import com.healthy.suggestions.service.IUserHealthHistoryService;

/**
 * 健康评分Service业务层处理
 * 
 * @author 束伟
 * @date 2024-03-29
 */
@Service
public class UserHealthHistoryServiceImpl implements IUserHealthHistoryService 
{
    @Autowired
    private UserHealthHistoryMapper userHealthHistoryMapper;

    /**
     * 查询健康评分
     * 
     * @param id 健康评分主键
     * @return 健康评分
     */
    @Override
    public UserHealthHistory selectUserHealthHistoryById(Long id)
    {
        return userHealthHistoryMapper.selectUserHealthHistoryById(id);
    }

    /**
     * 查询健康评分列表
     * 
     * @param userHealthHistory 健康评分
     * @return 健康评分
     */
    @Override
    public List<UserHealthHistory> selectUserHealthHistoryList(UserHealthHistory userHealthHistory)
    {
        return userHealthHistoryMapper.selectUserHealthHistoryList(userHealthHistory);
    }

    /**
     * 新增健康评分
     * 
     * @param userHealthHistory 健康评分
     * @return 结果
     */
    @Override
    public int insertUserHealthHistory(UserHealthHistory userHealthHistory)
    {
        return userHealthHistoryMapper.insertUserHealthHistory(userHealthHistory);
    }

    /**
     * 修改健康评分
     * 
     * @param userHealthHistory 健康评分
     * @return 结果
     */
    @Override
    public int updateUserHealthHistory(UserHealthHistory userHealthHistory)
    {
        return userHealthHistoryMapper.updateUserHealthHistory(userHealthHistory);
    }

    /**
     * 批量删除健康评分
     * 
     * @param ids 需要删除的健康评分主键
     * @return 结果
     */
    @Override
    public int deleteUserHealthHistoryByIds(Long[] ids)
    {
        return userHealthHistoryMapper.deleteUserHealthHistoryByIds(ids);
    }

    /**
     * 删除健康评分信息
     * 
     * @param id 健康评分主键
     * @return 结果
     */
    @Override
    public int deleteUserHealthHistoryById(Long id)
    {
        return userHealthHistoryMapper.deleteUserHealthHistoryById(id);
    }
}
